-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement directory listing #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
Forgot to mention -- here's the xrootd configuration in use:
|
Adds a new request type, list, and interprets the results as a directory listing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requests for a few comments in sections that were a bit dense. After merging, can you also open an issue for adding unit tests to some of the easier targets in this? Stuff like URL parsing should be easy enough to come back to shortly.
Further testing shows this also breaks more significantly. With a minimal config of:
The first GET test I usually run results in a segfault. From Curl:
And from the server:
Are the new URL queries supposed to be added on a basic GET like this? It also looks like the URL generated in |
Yup - my testing was all for specifying a bucket in the Can you confirm that if you specify a single bucket it works though? |
Hardcoding the bucket with the config:
still produces a segfault when I |
I'm back from vacation. Let me know if I can help with any of this, but I don't want to duplicate work. |
@rw2, definitely! Do you want to see if you can start stitching up some of the missing pieces to get this working? We have a lot of interest in this right now. |
ok, working on it now. I'll ping you on slack if I have questions. |
@rw2 - any updates on this? I'd like to get the directory listing wrapped into this month's release, which nominally happens on Thursday. |
Last Thu/Fri: Wouldn't compile for me, which was weird. There must be something different in our environments. Fixed compile. Reproduced it. Got rid of the segfault, but it was a symptom, so the file didn't download. Couldn't work on it yesterday, back at it again this morning. |
Includes: - Simple refactoring to follow common C++ coding styles. - Handling of various edge cases when the object is missing or empty. - Fixing path-based URL mode. - Fix bucket name parsing from path when a specific bucket is not configured. - Fix segfaults when using continuation tokens.
For now, this hardcodes a test bucket in OpenData in AWS; while unfortunate to require on an external service, it helps bootstrap the testing process.
@jhiemstrawisc -- ready for re-review! Beyond fixing the original branch (and some patches from @rw2), this also adds unit tests for the listing functionality and pre-commit settings (so I stop getting caught by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and my hand tests all appear to pass.
Implements the
ListObjectsV2
query against the S3 endpoint, allowing XRootD to interpret a directory-like structure in S3 as a XRootD directory.This has been lightly tested against public S3 buckets using
curl
queries like this:where the query file is as follows:
It is the first use of query parameters in the signature creation code -- that might need some attention. Also did some modest refactoring around how the requests are passed (mostly to avoid repeating all the configuration strings). Needs to have path-style URLs tested and simple GET/PUT of data to look for regressions.